package com.fengzheng.basic.service.sys.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fengzheng.basic.model.vo.SysMenuVo;
import com.fengzheng.basic.model.common.TreeNode;
import com.fengzheng.basic.model.po.SysMenuPo;
import com.fengzheng.basic.service.sys.ISysMenuService;
import com.fengzheng.basic.mapper.sys.SysMenuMapper;
import com.fengzheng.basic.service.sys.ISysRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author liht
* @description 针对表【sys_menu】的数据库操作Service实现
* @createDate 2022-03-28 17:18:39
*/
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenuPo>
implements ISysMenuService {

    @Autowired
    private ISysRoleMenuService sysRoleMenuService;

    @Override
    public List<SysMenuVo> findMenuByRoleIds(List<Long> roleIds) {
        return baseMapper.findMenuByRoleIds(roleIds);
    }

    @Override
    public List<SysMenuVo> selectByParentId(Long id) {
        return baseMapper.selectByParentId(id);
    }

    @Override
    public List<SysMenuVo> getTreeByParentId(Long id) {
        return baseMapper.getTreeByParentId(id);
    }
}
